home *** CD-ROM | disk | FTP | other *** search
- Path: news.urz.uni-heidelberg.de!usenet
- From: pstarzet@ix.urz.uni-heidelberg.de (Paul Starzetz)
- Newsgroups: comp.lang.c++
- Subject: Re: easy c++ question
- Date: 10 Apr 1996 16:25:12 GMT
- Organization: University of Heidelberg, Germany
- Distribution: world
- Message-ID: <4kgnd8$5hp@sun0.urz.uni-heidelberg.de>
- References: <316901DA.3138C677@ablecom.net>
- Reply-To: pstarzet@ix.urz.uni-heidelberg.de
- NNTP-Posting-Host: aixterm7.urz.uni-heidelberg.de
-
- In article 3138C677@ablecom.net, The Letter O <jczech@ablecom.net> writes:
-
- class stack {
- > private:
- > int count; // number of items in the stack
- > int data[100]; // the items themselves
- > public:
- > .
- >inline stack::stack(void)
- >{
- > count = 0; // zero the stack
- > cout << "constructor has been called\n";
- >}
- >//==============================================
- >
- try to flush the output stream, otherwise you will not see anything!
- I have some Unix experience and have already encoutered this problem.
- Try:
-
- #include <iomanip.h>
-
- inline stack::stack(void)
- {
- count = 0; // zero the stack
- cout << "constructor has been called\n";
- cout << flush;
- }
-
- ...otherwise use another compiler !!!
-
-
-
-